*This file creates map Figure 4

cd "$path"

*Install packages needed for the analysis
ssc install spmap

*Import map linked exposure
use  "bartik_shocks_map.dta", clear

spmap bartik2 using muncoords, id(id2) fcolor(YlOrRd) legend(pos(9)) osize(*0.10 ...) ndsize(*0.1) ndf(gs14)   clbreaks(0 1 2 3 4) ///
legend(pos(9) size(*1.5)  label(2 "1st quartile" ) label(3  "2nd quartile"  ) label(4  "3rd quartile" ) label(5  "4th quartile" ) title("Exposure"))  graphregion(lcolor(black) fcolor(white) color(white)) 

graph export "$graphs/bartik_map.eps", as(eps) replace
graph export "$graphs/bartik_map.pdf", as(pdf) replace

spmap bartik2 using muncoords, id(id2) fcolor(gs12 gs10 gs8 gs4 gs25) legend(pos(9)) osize(*0.10 ...) ndsize(*0.1) ndf(gs14)   clbreaks(0 1 2 3 4) ///
legend(pos(9) size(*1.5)  label(2 "1st quartile") label(3 "2nd quartile") label(4 "3rd quartile") label(5 "4th quartile") title("Exposure")) ///
graphregion(lcolor(black) fcolor(white) color(white))

graph export "$graphs/bartik_map_bw.eps", as(eps) replace
graph export "$graphs/bartik_map_bw.pdf", as(pdf) replace



